package wang.chunfan.springcloud.learning.consul.ribbon.server.model;

import java.io.Serializable;

/**
 * @version 1.0
 * @Author wangchunfan
 * @Date 2020/5/22 9:55
 **/
public class Result<T> implements Serializable {
    private T data;
    private String message = "success";
    private int code = 200;

    public Result() {

    }

    public Result(T data, int code, String message) {
        this.data = data;
        this.code = code;
        this.message = message;
    }

    public Result(String message, int code) {
        this.message = message;
        this.code = code;
    }

    public Result(T data) {
        this.data = data;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
